home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CD Actual 9
/
CDACTUAL9.iso
/
share
/
Dos
/
VARIOS
/
pascal
/
DELPHI.SWG
/
0022_Making your own hotkeys.pas
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
Pascal/Delphi Source File
|
1996-02-21
|
320 b
|
15 lines
{
Q: How can I trap for my own hotkeys?
A: First: set the form's KeyPreview := true;
Then, you do something like this:
}
procedure TForm1.FormKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin
if (ssCtrl in Shift) and (chr(Key) in ['A', 'a']) then
ShowMessage('Ctrl-A');
end;